package com.weifangfirecontrolformal.weifangfirecontrolformal.web.service.maintenancesystem.basisinfo;

import cn.hutool.json.JSONObject;
import com.weifangfirecontrolformal.weifangfirecontrolformal.common.base.BaseService;
import com.weifangfirecontrolformal.weifangfirecontrolformal.support.model.RespEntity;
import com.weifangfirecontrolformal.weifangfirecontrolformal.support.utils.requestutil.HttpRequestUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @Author: YangYu
 * @ClassName: EntrustBusinessService
 * @Date: Created in 10:05 2020/12/21
 * @Description: 委托单位服务
 */
@Service
@Slf4j
public class EntrustBusinessService extends BaseService {


    /**
     * @Author YangYu
     * @Description 分页列表
     * @Date Created in 11:39 2020/12/21
     * @Param [jsonParam]
     */

    public RespEntity entrustBusinessPagList(JSONObject jsonParam) {
        //处理支持form-data和json两种方式
        jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
        return restJava(jsonParam,"basisInfo","entrustBusinessPagList","entrustBusiness");
    }

    /**
     * @Author YangYu
     * @Description 委托单位详情
     * @Date Created in 10:34 2020/12/23
     * @Param [jsonParam]
     */

    public RespEntity detail(JSONObject jsonParam) {
        //处理支持form-data和json两种方式
        jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
        return restJava(jsonParam,"basisInfo","detail","entrustBusiness");
    }

    /**
     * @Author YangYu
     * @Description 委托单位新增
     * @Date Created in 9:38 2020/12/23
     * @Param [jsonParam]
     */

    public RespEntity add(JSONObject jsonParam) {
        //处理支持form-data和json两种方式
        jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
        return restJava(jsonParam,"basisInfo","add","entrustBusiness");
    }

    /**
     * @Author YangYu
     * @Description 委托单位更新
     * @Date Created in 10:08 2020/12/23
     * @Param [jsonParam]
     */

    public RespEntity update(JSONObject jsonParam) {
        //处理支持form-data和json两种方式
        jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
        return restJava(jsonParam,"basisInfo","update","entrustBusiness");
    }
    /**
     * @Author YangYu
     * @Description 委托单位删除
     * @Date Created in 10:32 2020/12/24
     * @Param [jsonParam]
     */

    public RespEntity delete(JSONObject jsonParam){
        //处理支持form-data和json两种方式
        jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
        return restJava(jsonParam,"basisInfo","delete","entrustBusiness");
    }
}
